// +----------------------------------------------------------------------
// | xx [ xx赋能开发者，方便快捷开发]
// +----------------------------------------------------------------------
// | Copyright (c) 2016~2021 https://www.xxx.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed xx并不是自由软件，未经许可不能去掉xx相关版权
// +----------------------------------------------------------------------
// | Author: xx Team <xx@xx.com>
// +----------------------------------------------------------------------
// | Description:   用户权限信息
// +----------------------------------------------------------------------

import { defineStore } from "pinia";
import { SelfStorage } from "../securels";

export const useAuthStore = defineStore("authStore", {
  state: () => ({
    token: "", // token
    userInfo: {
      // 用户信息
      userId: "", // 用户ID
      userName: "", // 用户名
      dashboard: "", // 仪表盘
      role: [], // 角色
    },
  }),
  persist: {
    key: "AUTH",
    storage: SelfStorage,
  },
});
